﻿CREATE  proc [dbo].[danhmucTienTe_Sua]
@loaitien varchar(255),
@ten nvarchar(255),
@tenle nvarchar(255),
@loaitien_old varchar(255)
as
if exists(select * from DM_TIenTe  Where loaitien<>@loaitien  and ten=@ten   )
begin
select ErrCode=0
end
else
begin
update DM_TIenTe   set ten=@ten,tenle=@tenle
 WHere loaitien=@loaitien_old
 
select ErrCode=1
end